import request from '../../api/request'

// 查询某模板下签署人员信息
export function contractTemplateDetails(data){
    return request.get('/api/v2/elesign/ele-sign-contract-template/sign-people-info', data).then(res => {
        return res.data.data
    })
}

// 重新发电子签
export function relaunchEleSign(data){
    return request.post('/api/v2/ele-sign/contract-record/resend', data).then(res => {
        return res.data.data
    })
}

// 取消签署
export function cancelSignContract(data){
    return request.put('/api/v2/ele-sign/contract-record/cancel', data).then(res => {
        return res.data.data
    })
}

// 合同签署记录列表
export function contractSignRecordList(data){
    return request.get('/api/v2/ele-sign/project/list', data).then(res => {
        return res.data.data
    })
}

// 查询企业合同模板列表
export function contractTemplateList(data){
    return request.get('/api/v2/elesign/ele-sign-contract-template/list', data).then(res => {
        return res.data.data
    })
}

// 发起合同
export function launchContract(data){
    return request.post('/api/v2/ele-sign/project', data).then(res => {
        return res.data.data
    })
}

// 电子签通讯录添加员工
export function addToEleSignProject(data){
    return request.post('/api/v2/ele-sign/contract-record/add-to-ele-sign-project', data).then(res => {
        return res.data.data
    })
}

// 修改工价
export function contractModifyWages(data){
    return request.put('/api/v2/ele-sign/project/edit', data).then(res => {
        return res.data.data
    })
}

// 加入电子合同列表 
export function invitationStaffList(data){
    return request.get('/api/v2/ele-sign/contract-record/invite', data, {
        isLoading: false
    }).then(res => {
        return res.data.data
    })
}

// 电子签 - 公对公充值 
export function addRechargeRecord(data){
    return request.post('/api/v2/ele-sign/account/add-recharge-record', data).then(res => {
        return res.data.data
    })
}

// 电子签 充值记录 /api/v2/ele-sign/account/recharge-record
export function getEleSignRechargeRecord(data){
    return request.get('/api/v2/ele-sign/account/recharge-record', data).then(res => {
        return res.data.data
    })
}

